package com.demo.jingxi.controller;


import com.demo.jingxi.common.Result;
import com.demo.jingxi.pojo.Menu;
import com.demo.jingxi.service.IXMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author aoyuan
 * @since 2023-09-25
 */
@RestController
@RequestMapping("/menu")
public class XMenuController {
    @Autowired
    private IXMenuService ixMenuService;

    @GetMapping
    public Result<?> getAllMenu(){
        List<Menu> menuList =  ixMenuService.getAllMenu();
        return Result.success(menuList);
    }

}
